package org.jivesoftware.webchat.servlets;

import java.io.IOException;
import java.util.Properties;

public class Config extends Properties{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private static final String METHOD = "method";
	private static final String FILE_DOWNLOAD_PATH = "fileDownloadPath";
	
	private static Config instance = new Config();
	private Config() {
		try {
			load(Config.class.getResourceAsStream("/config.properties"));
		} catch (IOException e) {
			System.out.println("加载配置文件config.properties出错！");
			e.printStackTrace();
		}
	}
	
	public static String getMethod() {
		return instance.get(METHOD).toString();
	}
	
	public static String getFileDownloadPath() {
		return instance.get(FILE_DOWNLOAD_PATH).toString();
	}
}
